package landun.service.impl;

import landun.dao.BizClaimVoucherDao;
import landun.pojo.BizClaimVoucher;
import landun.pojo.Page;
import landun.pojo.SysEmployee;
import landun.service.BizClaimVoucherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service("claimVoucherService")
public class BizClaimVoucherServiceImpl implements BizClaimVoucherService {
    @Autowired
    private BizClaimVoucherDao bizClaimVoucherDao;

    @Override
    public List<BizClaimVoucher> findClaimVoucher(String status, Date stratDate, Date endDate, SysEmployee employee, Page page) {
        return bizClaimVoucherDao.findClaimVoucher( status,  stratDate,  endDate, employee,page);
    }

    @Override
    public List<Object []> findStatusMap() {
        return bizClaimVoucherDao.findStatusMap();
    }

    @Override
    public Integer totalCount(String status, Date stratDate, Date endDate, SysEmployee employee) {
        return bizClaimVoucherDao.totalCount(status,  stratDate,  endDate, employee);
    }

    @Override
    public void save(BizClaimVoucher bizClaimVoucher) {
        bizClaimVoucherDao.save(bizClaimVoucher);
    }

    @Override
    public void updateClaimVoucher(BizClaimVoucher bizClaimVoucher) {
        bizClaimVoucherDao.updateClaimVoucher(bizClaimVoucher);
    }

    @Override
    public BizClaimVoucher findVoucherById(Integer id) {
        return bizClaimVoucherDao.findVoucherById(id);
    }

    @Override
    public List<BizClaimVoucher> managerFindVoucher(Integer deptId, Page page) {
        return bizClaimVoucherDao.managerFindVoucher(deptId,page);
    }

    @Override
    public List<BizClaimVoucher> generalmanagerFindVoucher(Integer id, Page page) {
        return bizClaimVoucherDao.generalmanagerFindVoucher(id,page);
    }

    @Override
    public List<BizClaimVoucher> cashierFindVoucher(Integer id, Page page) {
        return bizClaimVoucherDao.cashierFindVoucher(id,page);
    }
}
